using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class Root : MonoBehaviour,IPointerClickHandler,IPointerExitHandler
{
    public GameObject infoPanel;

    private void Start()
    {
        GameManager.Instance.inArea.Add(gameObject);
    }
    public void OnPointerClick(PointerEventData eventData)
    {
        if (eventData.button.ToString()=="Right") {
            infoPanel.SetActive(true);
        }
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        infoPanel.SetActive(false);
    }
    
}
